package com.k2.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.k2.common.utils.PageUtils;
import com.k2.common.vo.UserRegisterVo;
import com.k2.gulimall.member.entity.MemberEntity;
import com.k2.gulimall.member.vo.SocialUser;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

/**
 * 会员
 *
 * @author changchaojie
 * @email changchaojie@gmail.com
 * @date 2020-11-09 17:36:10
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 根据用户名、邮箱、手机号、状态查询用户
     * @param memberEntity
     * @return
     */
    List<MemberEntity> getUserName(MemberEntity memberEntity);
    List<MemberEntity> getUserEmail(MemberEntity memberEntity);
    List<MemberEntity> getUserMobile(MemberEntity memberEntity);
    List<MemberEntity> getUserlevelId(Long[] ids);
    MemberEntity getUserSocialUid(String socialUid);

    /**
     * 通过用户id数组修改用户装填
     * @param ids
     * @return
     */
    boolean batchdelete(String ids,Integer status);

    /**
     * 社交用户的登录
     * @param socialUser
     * @return
     */
    MemberEntity login(SocialUser socialUser,UserRegisterVo userRegisterVo) throws Exception;

    /**
     * 微信登录
     * @param accessTokenInfo
     * @return
     */
    MemberEntity login(String accessTokenInfo,UserRegisterVo userRegisterVo);
}

